#include "List.h"
#include "Node.h"

#include <iostream>

using namespace std;

int main(void) {
	Node node;
	node.data = 3;

	List *list = new List();
	list->ListInsertHead(&node);
	node.data = 2;
	list->ListInsertHead(&node);
	node.data = 5;
	list->ListInsertHead(&node);
	node.data = 6;
	list->ListInsertHead(&node);
	node.data = 8;
	list->ListInsertHead(&node);
	node.data = 1;
	list->ListInsertHead(&node);


	list->ListInsert(0, &node);
	list->ListInsert(1, &node);

	Node tmp;
	list->ListDelete(0, &tmp);

	list->ListTraverse();
	cout << tmp.data << endl;

	delete list;
	list = NULL;

	return 0;
}